/*
 * @Authoryour name
 * @Date2020-11-28 10:46:30
 * @LastEditTime2020-11-28 10:46:30
 * @LastEditorsyour name
 * @DescriptionIn User Settings Edit
 * @FilePath\STM32H750_FreeRTOS\Bsp\led\bsp_led.c
 */ 
#include "bsp_led.h"

void bsp_led_init(void)
{
    /* Enable Gpio Clock */
    LED_R_CLK_EN();
    LED_B_CLK_EN();
    /* Led gpio config */
    LL_GPIO_SetPinMode(LED_B_PORT, LED_B_PIN, LL_GPIO_MODE_OUTPUT);
    LL_GPIO_SetPinOutputType(LED_B_PORT, LED_B_PIN, LL_GPIO_OUTPUT_PUSHPULL);
    LL_GPIO_SetPinSpeed(LED_B_PORT, LED_B_PIN, LL_GPIO_SPEED_FAST);
    
    LL_GPIO_SetPinMode(LED_R_PORT, LED_R_PIN, LL_GPIO_MODE_OUTPUT);
    LL_GPIO_SetPinOutputType(LED_R_PORT, LED_R_PIN, LL_GPIO_OUTPUT_PUSHPULL);
    LL_GPIO_SetPinSpeed(LED_R_PORT, LED_R_PIN, LL_GPIO_SPEED_FAST);
}

void bsp_led_deinit(void)
{
    LL_GPIO_DeInit(LED_B_PORT);
    LL_GPIO_DeInit(LED_R_PORT);
    LED_B_CLK_DI();
    LED_R_CLK_DI();
}

